﻿using AiXiu.BLL;
using AiXiu.IBLL;
using System.Web;

namespace AiXiu.WebSite
{
    /// <summary>
    /// 视频删除处理程序
    /// </summary>
    public class VideoDeleteHandler : IHttpHandler
    {
        /// <summary>
        /// 处理请求
        /// </summary>
        /// <param name="context"></param>
        public void ProcessRequest(HttpContext context)
        {
            // 读取参数
            string videoId = context.Request.QueryString["videoId"];
            // 删除视频
            IVideoManager videoManager = new VideoManager();
            videoManager.DeleteVideo(videoId);
            // 输出结果
            context.Response.ContentType = "text/plain";
            context.Response.Write("ok");
            context.Response.End();
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}